package com.yuanfeng.activity.controller;

import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.commoms.vo.activity.JoinPintuanParamVO;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

/**
 * @ClassName ActivityPiecingTogetherMarkController
 * @Description
 * @Author hyq
 * @Date 2023/6/27 14:58
 * @Version 1.0
 **/
@RestController
@RequestMapping("activity/piecingTogetherMark")
public class ActivityPiecingTogetherMarkController extends BaseController{

    /**
     * 查询拼团信息 feign
     */
    @PostMapping("/selectMarkInfo")
    public ResponseResult selectMarkInfo(@RequestBody Map<String,Object> param) {
        ResponseResult result = activityPiecingTogetherService.selectMarkInfo(param);
        return result;
    }

    /**
     * 修改拼团支付状态
     */
    @PostMapping("/updatePayStart")
    ResponseResult updatePinTuanPayStart(@RequestBody Map<String,Object> param) {
        ResponseResult result = activityPiecingTogetherService.updatePayStart(param);
        return result;
    }

    /**
     * 查询活动商品价格
     */
    @PostMapping("/query/goodsPrice")
    ResponseResult queryGoodsPrice(@RequestParam Integer goodsId) {
        ResponseResult result = activityPiecingTogetherService.queryGoodsPrice(goodsId);
        return result;
    }


    /**
     * 查询拼团详情
     *
     * @param param
     * @return
     */
    @PostMapping("/join/query/detail")
    public ResponseResult queryDetail(@RequestBody JoinPintuanParamVO param) {
        ResponseResult result = activityPiecingTogetherService.queryDetail(param);
        return result;
    }

    /**
     * 正在拼团的用户列表
     */
    @PostMapping("/query/list")
    public ResponseResult queryList(@RequestBody Map<String,Object>  param) {
        ResponseResult result=activityPiecingTogetherService.queryList(param);
        return result;
    }
}
